import request from '@/utils/request'


// 分页列表,按照分类名称模糊查询
export function findStrategyClassifyByPage(data) {
  return request({
    url: '/invest/strategy/findStrategyClassifyByPage',
    method: 'post',
    data
  })
}

// 添加或修改分类
export function addOrUpdateStrategyClassify(data) {
  return request({
    url: '/invest/strategy/addOrUpdateStrategyClassify',
    method: 'post',
    data
  })
}

// 根据id删除分类
export function deleteStrategyClassifyById(data) {
  return request({
    url: '/invest/strategy/deleteStrategyClassifyById',
    method: 'post',
    data
  })
}

////////////////////   详情

// 头部信息
export function getClassifyHeadDetail(data) {
  return request({
    url: '/invest/strategy/getClassifyByClassifyId',
    method: 'post',
    data
  })
}

// 收益走势图
export function findClassifyNetworthByClassifyId(data) {
  return request({
    url: '/invest/networth/findClassifyNetworthByClassifyId',
    method: 'post',
    data
  })
}

// 收益走势图 新 策略叠加
export function findClassifyNetworthByClassifyIdNew(data) {
  return request({
    url: '/invest/networth/findClassifyNetworthByClassifyIdNew',
    method: 'post',
    data
  })
}

// 最大回撤接口
export function getClassifyMaxDown(data) {
  return request({
    url: '/invest/networth/getClassifyMaxDown',
    method: 'post',
    data
  })
}

// 风险指标
export function getClassRiskRateByClassifyId(data) {
  return request({
    url: '/invest/networth/getClassRiskRateByClassifyId',
    method: 'post',
    data
  })
}

// 分类详情-历史净值列表
export function classClassifyHistory(data) {
  return request({
    url: '/invest/networth/classClassifyHistory',
    method: 'post',
    data
  })
}

// 月度表现
export function findClassifyNetWorthMonthly(data) {
  return request({
    url: '/invest/networth/findClassifyNetWorthMonthly',
    method: 'post',
    data
  })
}

// 1 3 6 12 24 36月收益
export function findClassifyNetWorthExtendBySegment(data) {
  return request({
    url: '/invest/networth/findClassifyNetWorthExtendBySegment',
    method: 'post',
    data
  })
}

// 月度表现直方图
export function findClassifyNetWorthMonthlyHistogram(data) {
  return request({
    url: '/invest/networth/findClassifyNetWorthMonthlyHistogram',
    method: 'post',
    data
  })
}

// 月度表现分布
export function findClassifyNetWorthMonthDistribute(data) {
  return request({
    url: '/invest/networth/findClassifyNetWorthMonthDistribute',
    method: 'post',
    data
  })
}

// 分类详情-每个月收益净值列表
export function findClassifyNetWorthMonthDetailByPage(data) {
  return request({
    url: '/invest/networth/findClassifyNetWorthMonthDetailByPage',
    method: 'post',
    data
  })
}

// 分类详情-详情中所属策略列表
export function getStrategyClassifyExt(data) {
  return request({
    url: '/invest/strategy/getStrategyClassifyExt',
    method: 'post',
    data
  })
}

// 分类中增加或修改策略
export function addOrUpdateClassifyStrategyExy(data) {
  return request({
    url: '/invest/strategy/addOrUpdateClassifyStrategyExy',
    method: 'post',
    data
  })
}

// 删除分类中的策略
export function deleteClassifyStrategyExt(data) {
  return request({
    url: '/invest/strategy/deleteClassifyStrategyExt',
    method: 'post',
    data
  })
}

// 根据分类id和策略id查询详情
export function findClassifyStrategyExtById(data) {
  return request({
    url: '/invest/strategy/findClassifyStrategyExtById',
    method: 'post',
    data
  })
}

// 月度表现弹窗子数据
export function classifyMonthlyIncreaseDialog(data) {
  return request({
    url: '/invest/networth/classifyMonthlyIncreaseDialog',
    method: 'post',
    data
  })
}

// 分类净值曲线-新版本
export function findClassifyNetworthByClassifyIdPlus(data) {
  return request({
    url: '/invest/networth/findClassifyNetworthByClassifyIdPlus',
    method: 'post',
    data
  })
}

// 最大回撤曲线-新版
export function findMaxDownByClassifyId(data) {
  return request({
    url: '/invest/networth/findMaxDownByClassifyId',
    method: 'post',
    data
  })
}

// 同区间分类
export function findStrategyIntersection(data) {
  return request({
    url: '/invest/networth/findStrategyIntersection',
    method: 'post',
    data
  })
}

// ----------------- v0.2.0 优化 -----------------

// 季度区间收益率-分类
export function getClassifyQuarter(data) {
  return request({
    url: '/invest/networth/getClassifyQuarter',
    method: 'post',
    data
  })
}
// 年度区间收益率-分类
export function getClassifyYear(data) {
  return request({
    url: '/invest/networth/getClassifyYear',
    method: 'post',
    data
  })
}
// 区间收益-分类
export function getClassifySegment(data) {
  return request({
    url: '/invest/networth/getClassifySegment',
    method: 'post',
    data
  })
}
// 季度浮盈浮亏(直方图)-分类
export function getQuarterClassifyNetWorthDistribute(data) {
  return request({
    url: '/invest/networth/getQuarterClassifyNetWorthDistribute',
    method: 'post',
    data
  })
}
// 年度浮盈浮亏(直方图)-分类
export function getYearClassifyNetWorthDistribute(data) {
  return request({
    url: '/invest/networth/getYearClassifyNetWorthDistribute',
    method: 'post',
    data
  })
}
// 区间浮盈浮亏(直方图)-分类
export function getSegmentClassifyNetWorthDistribute(data) {
  return request({
    url: '/invest/networth/getSegmentClassifyNetWorthDistribute',
    method: 'post',
    data
  })
}


// ----------------- v0.3.0 优化 -----------------

// 分类下投策相关性
export function getClassifyStrategyRelevance(data) {
  return request({
    url: '/invest/networth/getClassifyStrategyRelevance',
    method: 'post',
    data
  })
}







